<div class="box_right">
	<h1>加油站创建</h1>
    <!-- Main content -->
    <div class="pro_box layui-form">
        <div class="layui-form-item">
			<div class="layui-inline" style="width: 100%;">
			<?php if (validation_errors()!=''){?>
	        <div id="info_msg" class="alert alert-danger"><?php echo validation_errors();?></div>
	        <?php }?>
	            <!-- general form elements disabled -->
	                <form id="usrform" role="form" action="<?php echo base_url().'gasstation/gasstation/add_gasstation';?>" method="post">
	                	<input type="hidden" name="user_id" value="0">
	                	<div class="box-body" style="display: inline-block;width: 100%">
	                        <div class="form-group col-xs-6">
	                            <label>加油站名称</label>
	                            <input name="gasstation_name" type="text" class="layui-input" placeholder="输入 ..." value="<?php echo set_value("gasstation_name")?>" check-type="required">
	                        </div>
	                    <div class="form-group col-xs-6">
				            <label>加油站经度：</label>
				            <input name="longitude" type="text" class="layui-input" placeholder="输入 ..." value="<?php if (isset($gasstation->longitude))echo $gasstation->longitude;?>" check-type="required">
			            </div>
			             <div class="form-group col-xs-6">
				            <label>加油站纬度：</label>
				            <input name="latitude" type="text" class="layui-input" placeholder="输入 ..." value="<?php if (isset($gasstation->latitude))echo $gasstation->latitude;?>" check-type="required">
			            </div>
			             <div class="form-group col-xs-6">
				            <label>加油站地址：</label>
				            <input name="address" type="text" class="layui-input" placeholder="输入 ..." value="<?php if (isset($gasstation->address))echo $gasstation->address;?>" check-type="required">
			            </div>
			             <div class="form-group col-xs-6">
				            <label> 账号：</label>
				            <input name="bank_card" type="text" class="layui-input" placeholder="输入 ..." value="<?php if (isset($gasstation->bank_card))echo $gasstation->bank_card;?>" check-type="required">
			            </div>
	                	</div><!-- /.box-body -->
	                	<div class="clearfix form-actions">
						<div class="col-md-offset-3 col-md-9">
							<button id="btnSubmit" class="btn btn-info" type="submit">
								<i class="icon-ok bigger-110"></i>
								保存
							</button>

							&nbsp; &nbsp; &nbsp;
							<a class="btn" href="<?php echo base_url()."gasstation/gasstation/index"?>">
								<i class="icon-undo bigger-110"></i>
								返回
							</a>
						</div>
					</div>
                </form>
	        </div>
		</div>
    </div>
</div>
<script>
//Demo
layui.use(['form','element','laydate'], function(){
  var form = layui.form,
  	element = layui.element,
  	laydate = layui.laydate;
});
</script>
<script type="text/javascript">
//验证表单
$(function(){
    $.Tipmsg.r=null;
    $("#usrform").Validform({
        tiptype:function(msg){
            layer.msg(msg);
        },
        tipSweep:true,
        ajaxPost:false
    });
})
</script>